import 'package:flutter_test/flutter_test.dart';
import 'package:svgaplayer/svgaplayer.dart';
import 'package:svgaplayer/svgaplayer_platform_interface.dart';
import 'package:svgaplayer/svgaplayer_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockSvgaplayerPlatform
    with MockPlatformInterfaceMixin
    implements SvgaplayerPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final SvgaplayerPlatform initialPlatform = SvgaplayerPlatform.instance;

  test('$MethodChannelSvgaplayer is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelSvgaplayer>());
  });

  test('getPlatformVersion', () async {
    Svgaplayer svgaplayerPlugin = Svgaplayer();
    MockSvgaplayerPlatform fakePlatform = MockSvgaplayerPlatform();
    SvgaplayerPlatform.instance = fakePlatform;

    expect(await svgaplayerPlugin.getPlatformVersion(), '42');
  });
}
